<?php
// +----------------------------------------------------------------------
// | yylAdmin 前后分离，简单轻量，免费开源，开箱即用，极简后台管理系统
// +----------------------------------------------------------------------
// | Copyright https://gitee.com/skyselang All rights reserved
// +----------------------------------------------------------------------
// | Gitee: https://gitee.com/skyselang/yylAdmin
// +----------------------------------------------------------------------

namespace app\common\validate\magpie;

use think\Validate;

/**
 * 抽奖管理验证器
 */
class MagpieValidate extends Validate
{
    // 验证规则
    protected $rule = [
        'ids' => ['require', 'array'],
                
        
        'id' => 'require',
        
        
        
        
        'name' => 'require',
        
        
        
        
        'content' => 'require',
        
        
        'is_disable' => ['require', 'in' => '0,1'],
    ];

    // 错误信息
    protected $message = [
        
    ];

    // 验证场景
    protected $scene = [
        'info'    =>  ['id'],
        'add'     =>  ['name', 'content', ],
        'edit'    =>  ['id', 'name', 'content', ],
        'dele'    =>  ['ids'],
        'disable' =>  ['ids', 'is_disable'],
    ];
}
